<!--{eval 
	$_G['home_tpl_titles'] = array($blog['subject'], '{lang blog}');
	$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=$do&view=me\">{lang they_blog}</a>";
	$_G['home_tpl_spacemenus'][] = "<a href=\"home.php?mod=space&uid=$space[uid]&do=blog&id=$blog[blogid]\">{lang view_blog}</a>";
	$friendsname = array(1 => '{lang friendname_1}',2 => '{lang friendname_2}',3 => '{lang friendname_3}',4 => '{lang friendname_4}');
}-->
<!--{if empty($diymode)}-->
<!--{template common/header}-->

<div id="pt" class="wp">
	<a href="index.php" class="nvhm">$_G[setting][bbname]</a> &rsaquo;
	<a href="home.php">$_G[setting][navs][4][navname]</a> &rsaquo; 
	<a href="home.php?mod=space&do=blog">{lang blog}</a>
	 &rsaquo; <a href="home.php?mod=space&uid=$space[uid]&do=blog&view=me">{$space[username]}{lang somebody_blog}</a>
</div>

<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>

<div id="ct" class="wp cl">
	<div class="mn">
		<div class="ch">
			<label class="wx"><a href="$_G[setting][navs][4][filename]">$_G[setting][navs][4][navname]</a></label>
			{hook/space_blog_header}
		</div>
		<div class="bm">
		<!--{if $space[self]}-->
			<h1 class="mt"><img alt="blog" src="{STATICURL}image/feed/blog.gif" class="vm" /> {lang blog}</h1>
			<ul class="tb cl">
				<li$actives[we]><a href="home.php?mod=space&uid=$space[uid]&do=blog&view=we">{lang friend_blog}</a></li>
				<li$actives[me]><a href="home.php?mod=space&uid=$space[uid]&do=blog&view=me">{lang my_blog}</a></li>
				<li$actives[all]><a href="home.php?mod=space&uid=$space[uid]&do=blog&view=all">{lang view_all}</a></li>
				<li class="o"><a href="home.php?mod=spacecp&ac=blog">{lang post_new_blog}</a></li>
			<!--{if $_G[referer]}-->
				<li class="y"><a href="$_G[referer]">&laquo; {lang previous_page}</a></li>
			<!--{/if}-->
			</ul>
		<!--{else}-->
			<!--{template home/space_menu}-->
		<!--{/if}-->


<!--{else}-->
<!--{template home/space_header}-->
	<div id="ct" class="wp n cl">
		<div class="mn">
			<div class="bm">
				<h1 class="mt">{lang blog}</h1>
<!--{/if}-->

			<script type="text/javascript" charset="{CHARSET}" src="{$_G[setting][jspath]}home_calendar.js?{VERHASH}"></script>
			<div class="vw mtm mbm">
				<div class="h pbm bbs">
					<h1 class="ph{if $blog[magiccolor]} magiccolor$blog[magiccolor]{/if}">$blog[subject]</h1>
					<p class="xg2">
						<!--{if $blog['friend']}-->
						<span class="y">{$friendsname[$blog[friend]]}</span>
						<!--{/if}-->
						<!--{if $blog[hot]}--><strong class="hot">{lang hot} <em>$blog[hot]</em></strong><!--{/if}-->
						<!--{if $blog['friend']}-->
						<span class="y"><a href="home.php?mod=space&uid=$space[uid]&do=$do&view=me&friend=$blog[friend]" class="xg1">{$friendsname[$value[friend]]}</a></span>
						<!--{/if}-->
						<!--{if $blog[viewnum]}--><span class="xg1">{lang have_read_blog}</span><!--{/if}--> 
						<span class="xg1"><!--{date($blog[dateline])}--></span>

					{if $classarr[classname]}<span class="pipe">|</span><span class="xg1">{lang personal_category}:<a href="home.php?mod=space&uid=$blog[uid]&do=blog&classid=$blog[classid]&view=me">{$classarr[classname]}</a></span>{/if}
					{if $blog[catname]}<span class="pipe">|</span><span class="xg1">{lang system_cat}:<a href="home.php?mod=space&do=blog&view=all&catid=$blog[catid]">$blog[catname]</a></span>{/if}
					{if $blog[tag]}<span class="pipe">|</span><span class="xg1">{lang keywords}:$blog[tag]</span>{/if}

					</p>
					{hook/space_blog_title}
				</div>

				<div id="blog_article" class="d{if $blog[magicpaper]} magicpaper$blog[magicpaper]{/if}">
					<div class="resizeimg">
						<div class="resizeimg2">
							<div class="resizeimg3">
								<div class="resizeimg4">
									{ad/blog/a_b}
									$blog[message]
								</div>
							</div>
						</div>
					</div>
				</div>

				<div class="o cl">
					<a href="home.php?mod=spacecp&ac=favorite&type=blog&id=$blog[blogid]&spaceuid=$blog[uid]&handlekey=favoritebloghk_{$blog[blogid]}" id="a_favorite" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr ofav">{lang favorite}</a>
					<a href="home.php?mod=spacecp&ac=share&type=blog&id=$blog[blogid]&handlekey=sharebloghk_{$blog[blogid]}" id="a_share" onclick="showWindow(this.id, this.href, 'get', 0);" class="oshr">{lang share}</a>
					<!--{if $_G[uid] == $blog[uid]}-->						
						<!--{if $_G[setting][magics][call]}-->
						<img src="{STATICURL}image/magic/call.small.gif" alt="call" class="vm" />
						<a href="home.php?mod=magic&mid=call&idtype=blogid&id=$blog[blogid]" id="a_magic_call" onclick="showWindow('magics', this.href, 'get', 0);">{$_G[setting][magics][call]}</a>
						<span class="pipe">|</span>
						<!--{/if}-->
						<!--{if $_G[setting][magics][updateline]}-->
						<img src="{STATICURL}image/magic/updateline.small.gif" alt="updateline" class="vm" />
						<a href="home.php?mod=magic&mid=updateline&idtype=blogid&id=$blog[blogid]" id="a_magic_updateline" onclick="showWindow('magics', this.href, 'get', 0);">{$_G[setting][magics][updateline]}</a>
						<span class="pipe">|</span>
						<!--{/if}-->
						<!--{if $_G[setting][magics][downdateline]}-->
						<img src="{STATICURL}image/magic/downdateline.small.gif" alt="downdateline" class="vm" />
						<a href="home.php?mod=magic&mid=downdateline&idtype=blogid&id=$blog[blogid]" id="a_magic_downdateline" onclick="showWindow('magics', this.href, 'get', 0);">{$_G[setting][magics][downdateline]}</a>
						<span class="pipe">|</span>
						<!--{/if}-->						
						<!--{if $_G[setting][magics][hot]}-->
						<img src="{STATICURL}image/magic/hot.small.gif" alt="hot" class="vm" />
						<a href="home.php?mod=magic&mid=hot&idtype=blogid&id=$blog[blogid]" id="a_magic_hot" onclick="showWindow('magics', this.href, 'get', 0);">{$_G[setting][magics][hot]}</a>
						<span class="pipe">|</span>
						<!--{/if}-->
					<!--{/if}-->

					{hook/space_blog_op_extra}
					<!--{if $_G[uid] == $blog[uid] || checkperm('manageblog')}-->
					<a href="home.php?mod=spacecp&ac=blog&blogid=$blog[blogid]&op=edit">{lang edit}</a><span class="pipe">|</span>
					<a href="home.php?mod=spacecp&ac=blog&blogid=$blog[blogid]&op=delete&handlekey=delbloghk_{$blog[blogid]}" id="blog_delete_$blog[blogid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang delete}</a><span class="pipe">|</span>
					<!--{/if}-->
					<!--{if checkperm('manageblog')}-->

					IP: $blog[postip]<span class="pipe">|</span>
					<a href="home.php?mod=spacecp&ac=blog&blogid=$blog[blogid]&op=edithot&handlekey=bloghothk_{$blog[blogid]}" id="blog_hot_$blog[blogid]" onclick="showWindow(this.id, this.href, 'get', 0);">{lang hot}</a><span class="pipe">|</span>

					<!--{/if}-->

					<!--{if !$blog['friend'] && ($_G['group']['allowpostarticle'] || $_G['group']['allowmanagearticle'])}-->
					<a href="portal.php?mod=portalcp&ac=index&op=push&idtype=blogid&id=$blog[blogid]" onclick="showWindow('push', this.href, 'get', 0)">{lang article_push}</a>
					<!--{/if}-->

				</div>

			</div>

			<div id="click_div">
				<!--{template home/space_click}-->
			</div>
			<div id="div_main_content" class="mtm mbm">
				<h3 class="bbs pbn">
					<!--{if !empty($list)}-->
					<a href="#quickcommentform_{$id}" class="y xi2 xw0">{lang publish_comment}</a>
					<!--{/if}-->
					{lang comment} (<span id="comment_replynum">$blog[replynum]</span> {lang blog_replay})
				</h3>
				<div id="comment">
					<!--{if $cid}-->
					<div class="i">
						{lang current_blog_replay}<a href="home.php?mod=space&uid=$blog[uid]&do=blog&id=$blog[blogid]">{lang click_view_all}</a>
					</div>
					<!--{/if}-->
					<div id="comment_ul" class="xld xlda">
					<!--{loop $list $k $value}-->
						<!--{template home/space_comment_li}-->
					<!--{/loop}-->
					</div>
				</div>
				<!--{if $multi}--><div class="pgs cl">$multi</div><!--{/if}-->
			</div>

			<!--{if !$blog[noreply]}-->
			<form id="quickcommentform_{$id}" action="home.php?mod=spacecp&ac=comment" method="post" autocomplete="off" onsubmit="ajaxpost('quickcommentform_{$id}', 'return_qcblog_$id');doane(event);">
				<p>
					<span id="comment_face" title="{lang insert_emoticons}" onclick="showFace(this.id, 'comment_message');return false;" style="cursor: pointer;"><img src="{IMGDIR}/facelist.gif" alt="facelist" class="vm" /></span>
					{hook/space_blog_face_extra}
					<!--{if !empty($_G['setting']['magics']['doodle'])}-->
						<a id="a_magic_doodle" href="home.php?mod=magic&mid=doodle&showid=comment_doodle&target=comment_message" onclick="showWindow(this.id, this.href, 'get', 0)"><img src="{STATICURL}image/magic/doodle.small.gif" alt="doodle" class="vm" /> {$_G[setting][magics][doodle]}</a>
					<!--{/if}-->
				</p>
				<div class="tedt mtn mbn">
					<div class="area">
						<textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="3" class="pt"></textarea>
					</div>
				</div>
				<p class="pns">
					<input type="hidden" name="referer" value="home.php?mod=space&uid=$blog[uid]&do=$do&id=$id" />
					<input type="hidden" name="id" value="$id" />
					<input type="hidden" name="idtype" value="blogid" />
					<input type="hidden" name="handlekey" value="qcblog_{$id}" />
					<input type="hidden" name="commentsubmit" value="true" />
					<input type="hidden" name="quickcomment" value="true" />
					<button type="submit" name="commentsubmit_btn"value="true" id="commentsubmit_btn" class="pn"><strong>{lang comment}</strong></button>
					<span id="return_qcblog_{$id}"></span>
				</p>
				<input type="hidden" name="formhash" value="{FORMHASH}" />
			</form>
			<script type="text/javascript">
				function succeedhandle_qcblog_$id(url, msg, values) {
					if(values['cid']) {
						comment_add(values['cid']);
					} else {
						$('return_qcblog_{$id}').innerHTML = msg;
					}
				}
			</script>
			<!--{/if}-->


			<script type="text/javascript">
			function addFriendCall(){
				var el = $('friendinput');
				if(!el || el.value == "")	return;
				var s = '<input type="checkbox" name="fusername[]" class="pc vm" value="'+el.value+'" id="'+el.value+'" checked="checked">';
				s += ' <label for="'+el.value+'">'+el.value+'</label>';
				s += '<br />';
				$('friends').innerHTML += s;
				el.value = '';
			}
			resizeImg('div_main_content','450');

			var elems = selector('dd[class~=magicflicker]');
			for(var i=0; i<elems.length; i++){
				magicColor(elems[i]);
			}
			</script>

<!--{if empty($diymode)}-->
		</div>
	</div>

	<div class="sd">
		{subtemplate common/userabout}

		<!--{if $otherlist}-->
		<div class="bn">
			<a href="home.php?mod=space&uid=$blog[uid]&do=blog&view=me" class="y">{lang all}</a>
			<h2>{lang author_newest_blog}</h2>
			<ul class="xl">
				<!--{loop $otherlist $value}-->
				<li><a href="home.php?mod=space&uid=$value[uid]&do=blog&id=$value[blogid]">$value[subject]</a></li>
				<!--{/loop}-->
			</ul>
		</div>
		<hr class="da" />
		<!--{/if}-->

		<!--{if $newlist}-->
		<div class="bn">
			<h2>{lang popular_blog_review}</h2>
			<ul class="xl">
				<!--{loop $newlist $value}-->
				<li><em><a href="home.php?mod=space&uid=$value[uid]">$value[username]</a></em><a href="home.php?mod=space&uid=$value[uid]&do=blog&id=$value[blogid]">$value[subject]</a></li>
				<!--{/loop}-->
			</ul>
		</div>
		<!--{/if}-->

		{hook/space_blog_side_bottom}

		<div class="drag">
			<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
		</div>
		
	</div>

</div>

<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>

<!--{else}-->
		</div>
	</div>
	<div class="sd">
		{subtemplate home/space_userabout}
	</div>
</div>
<!--{/if}-->
<!--{template common/footer}-->
